<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .div{
            width: 120px;
            height: 200px;
            position: relative;
        }
        .div1{
            width:100px;
            height: 100px;
            border: 2px solid red;
            text-align: center;
            line-height: 100px;
            position: relative;
        }
        .div2{
            width: 30px;
            height: 30px;
            background: blue;
            font-size: 20px;
            color: wheat;
            text-align: center;
            border: 2px solid #ddd;
            border-radius: 50%;
            /* z-index: 3; */
           position: absolute;
           top: -10px;
           right: 0;
            
        }
</style>
</head>
<body>
    <div class="div">

    
    <div class="div1">微信</div>
    <div class="div2">2</div>
</div>
</body>
</html>